package cb.wzby;

import java.util.LinkedList;
import java.util.List;

public class LinkedList3 {
    public static void main(String[] args) {
        var l = new LinkedList<String>(List.of("a","b","c","d"));
        System.out.println(l);
        System.out.println(l.peek());
        //peek获取第一个元素
        System.out.println(l.pop());
        //移除第一个元素
        System.out.println(l.poll());
        //查询并移除第一个元素
    }
}
